<?php
require_once(dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR ."core".DIRECTORY_SEPARATOR."functions.php");
require_once("Role.php");

class CreateRole extends Role
{
	public function __construct($title,$description,$startTime,$endTime,$startDate,$endDate,$payRate,$positions,$skills,$activity)
	{
		$this->title = $title;
		$this->description = $description;
		$this->startTime = $startTime;
		$this->endTime = $endTime;
		$this->startDate = $startDate;
		$this->endDate = $endDate;
		$this->payRate = $payRate;
		$this->positions = $positions;
		$this->activity = $activity;
		$this->skills = $skills;
	}

	public function register()
	{
		$res = $this->insert("INSERT INTO role (title,description,startTime,endTime,startDate,endDate,activity,payRate,positions,skills) VALUES 
			('$this->title','$this->description','$this->startTime','$this->endTime','$this->startDate','$this->endDate','$this->activity','$this->payRate','$this->positions','$this->skills')");
		if($res)
		{
			return true;
		}
		else
		{
			return false;
		}
	}
}

?>